﻿Imports Clo = Enhancements.Core.Logging
Imports Ere = Enhancements.Basic.RegularExpressions
Imports Exe = Enhancements.Basic.Expressions
Imports Gen = System.Collections.Generic
Imports Glo = System.Globalization
Imports Iou = System.IO
Imports Ref = System.Reflection
Imports Reg = System.Text.RegularExpressions
Imports Sys = System
Imports Tex = System.Text
Imports Val = Enhancements.Basic.Expressions.Values
Imports Xsd = System.Xml.Schema
Imports W3c = System.Xml

Namespace Enhancements.Basic.Expressions.Functions
    ''' <summary>Represents a function signature's return specification.</summary>
    <Serializable(), DebuggerStepThrough()> _
    Public NotInheritable Class FunctionSignatureResult

        ''' <summary>Initializes a FunctionSignatureResult instance with the specified type.</summary>
        ''' <param name="_type">Type to use.</param>
        ''' <exception cref="FunctionSignatureResultTypeIsValidNotException">_type is null or it represents a type that is not allowed.</exception>
        Public Sub New(ByVal _type As Sys.Type)
            Type = _type
        End Sub

        Private __Type As System.Type = Nothing
        ''' <summary>Gets the type specified.</summary>
        Public Property Type() As System.Type
            Get
                Return __Type
            End Get
            Private Set(ByVal _value As System.Type)
                If Not Val.Value.___AssertIsValidType(_value) Then
                    FunctionSignatureResultTypeIsValidNotException.___Throw(_value)
                End If

                __Type = _value
            End Set
        End Property

    End Class
End Namespace
